package com.hobart.learning.lagou.edu.blogSystem.pojo;

import org.springframework.data.redis.core.RedisHash;
import org.springframework.data.redis.core.index.Indexed;

import javax.persistence.Id;

/**
 * @author: Hobart Mr.Bai
 * @create: 2021-05-11 19:31
 * @description:
 * @Version 1.0
 **/
@RedisHash("t_author")
public class Author {
    /**
     * 作者id
     */
    @Id
    private int id;

    /**
     * 作者姓名
     */
    @Indexed
    private String name;

    /**
     * 作者年龄
     */
    @Indexed
    private int age;

    /**
     * 描述
     */
    @Indexed
    private String description;

    @Override
    public String toString() {
        return "Author{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", description='" + description + '\'' +
                '}';
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }
}
